package gui;

import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;

public class doctorPage{
// Initialize all swing objects
private JFrame frame = new JFrame("Doctor Page"); // Create frame
private JPanel northPnl = new JPanel();
private JPanel eastPnl = new JPanel();
private JPanel westPnl = new JPanel();
private JPanel southPnl = new JPanel();
private JPanel centerPnl = new JPanel();
// Buttons to put in the panels
private JButton createPatientBtn = new JButton("Create Patient");
private JButton deletePatientBtn = new JButton("Delete Patient");
private JButton appointmentsBtn = new JButton("View Appointments");
private JButton viewPatientBtn = new JButton("View Patient");
private JButton recordBtn = new JButton("Create Treatment Record");
private JButton ordersBtn = new JButton("Create Doctor's Orders");
private JButton reportsBtn = new JButton("View Reports");
private JLabel titleLabel = new JLabel("Welcome Doctor");

public doctorPage(){
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	northPnl.add(titleLabel);
	createPatientBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		//Go to create patient page
		}
	});
	centerPnl.add(createPatientBtn);
	deletePatientBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		//Go to delete patient page
		}
	});
	centerPnl.add(deletePatientBtn);
	frame.getContentPane().setLayout(new BorderLayout());
	frame.getContentPane().add(northPnl, BorderLayout.NORTH);
	frame.getContentPane().add(centerPnl, BorderLayout.CENTER);
	recordBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		//Go to create treatment record page
		}
	});
	centerPnl.add(recordBtn);
	centerPnl.add(southPnl);
	appointmentsBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		//Go to View appointments page
		}
	});
	southPnl.add(appointmentsBtn);
	viewPatientBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		//Go to view patient page
		}
	});
	southPnl.add(viewPatientBtn);
	ordersBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
			//Go to add Doctors orders page
		}
	});
	centerPnl.add(ordersBtn);
	reportsBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		//Go to reports page
		}
	});
	centerPnl.add(reportsBtn);
}

// Need to add listeners for the buttons
}

